import yaml

with open(r"nanshan.yml") as f:
    msg = yaml.safe_load(f)
    print(msg["server"])
    msg["server"]["port"] = 8702
print("hello world")
print(msg)
with open(r"nanshan2.yml", mode="a", encoding="utf-8") as f:
    yaml.dump(msg, f, allow_unicode=True)
